<?php 
	//用户验证
		namespace Home\Model;
		use Think\Model;
	class UserModel extends Model{

		public function checkEmail($email){
			$res = $this->where("email='{$email}'")->find();
			return $res;
		}
		public function checkNickname($nickname){
			$res = $this->where("nickname='{$nickname}'")->find();
			return $res;
		}
		public function checkdate($email,$password){
			$arr = array(
					'email'=>$email,
					'password'=>md5($password),
				);
			$res = $this->where($arr)->find();
			return $res;
		}
		public function getOneuser(){
			$res = $this->where("id={$_SESSION['id']}")->find();
			return $res;
		}

	}












 ?>